
<!-- 页头 -->
<page-header-wrapper [title]="'业务报表'"></page-header-wrapper>
<nz-card nzTitle="运多星平台业务情况" [nzExtra]="extraTemplate" acl  [acl-ability]="['busiindex-tabel']">
  <ng-template #extraTemplate>
    <div class="chooseBox">
      <button nz-button nzType="primary" (click)="exportFun()">导出</button>
      <div class="timeBox">
        <nz-radio-group [(ngModel)]="mode" nzButtonStyle="solid" (ngModelChange)="changeData()" >
          <label nz-radio-button nzValue="year">年</label>
          <label nz-radio-button nzValue="month">月</label>
          <label nz-radio-button nzValue="date">日</label>
          <label nz-radio-button nzValue="define">自定义</label>
        </nz-radio-group>
        <div class="dateBox">
          <nz-date-picker [(ngModel)]="date" [nzMode]="mode" [nzFormat]="dateFormat" *ngIf="mode !== 'define'" [nzDisabledDate]="disabledDate" (ngModelChange)="onChange($event)"></nz-date-picker>
          <nz-range-picker [(ngModel)]="defineDate" [nzFormat]="dateFormat" *ngIf="mode === 'define'" [nzDisabledDate]="disabledDate" (ngModelChange)="onChange($event)"></nz-range-picker>
        </div>
      </div>
    </div>
  </ng-template>
  <st #st multiSort [columns]="columns" [ps]="20" [data]="service.$api_listPerformanceReportPage"
    [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
    [scroll]="{ x: '1200px' }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
    [page]="{ show: true, showSize: true, pageSizes: [20, 50, 100] }"></st>
</nz-card>
<nz-card nzTitle="业绩报表" [nzExtra]="extraTemplate01" acl  [acl-ability]="['busiindex-report']">
  <ng-template #extraTemplate01>
    <div class="chooseBox">
      <div class="timeBox">
        <nz-radio-group [(ngModel)]="modeNext" nzButtonStyle="solid" (ngModelChange)="changeDataNext()" >
          <label nz-radio-button nzValue="year">年</label>
          <label nz-radio-button nzValue="month">月</label>
        </nz-radio-group>
        <div class="dateBox">
          <nz-date-picker [(ngModel)]="dateNext" [nzDisabledDate]="disabledDate" [nzMode]="modeNext" (ngModelChange)="onChangeNext($event)"></nz-date-picker>
        </div>
      </div>
    </div>
  </ng-template>

  <div nz-row [nzGutter]="64">
    <div nz-col class="gutter-row" [nzSpan]="12">
      <div class="title">
        <div class="box" style="background-color: #3ba1ff;"></div> 环比(%)
      </div>
      <!-- <g2-custom delay="100" (render)="render($event)"></g2-custom> -->
     <!-- <app-busitable-curve></app-busitable-curve> -->
     <app-busitable-curve #curve [chartData]="chartData.chainRatio"></app-busitable-curve>
    </div>
    <div nz-col class="gutter-row" [nzSpan]="12">
      <div class="title">
        <div class="box" style="background-color: #f59a23;"></div> 业绩量(元)
      </div>
      <app-busitable-pillar #pillar [chartData]="chartData.performance"></app-busitable-pillar>
    </div>
  </div>
  
</nz-card>